package collection.randomitem.iteartor;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.Spliterator;
import java.util.function.Consumer;

/**
 * @author cyt
 * @create 2020-10-03 下午 8:28
 */
public class test implements Iterable<Integer> {

    @Override
    public Iterator<Integer> iterator() {
        return null;
    }

    @Override
    public void forEach(Consumer<? super Integer> action) {
        action.accept(3);
    }

    @Override
    public Spliterator<Integer> spliterator() {
        return null;
    }

    public static void main(String[] args) {
//        abstractclass.test abstractclass.test = new abstractclass.test();
//        abstractclass.test.forEach(System.out::println);
        ArrayList<Integer> integers = new ArrayList<>();
        integers.add(1);
        integers.add(3);
        Iterator<Integer> iterator = integers.iterator();
        iterator.forEachRemaining(System.out::println);
    }
}
